package com.kdg.thread;

/**
 * @author kong
 */
public class JoinYeildTest {
    public static void main(String[] args) {
        class AddThread extends Thread{
            @Override
            public void run() {
                System.out.println("addThread");
                super.run();
            }
        }

        AddThread addThread = new AddThread();
        addThread.start();
        try {
            addThread.join();  //线程等待
        } catch (InterruptedException e) {
            e.printStackTrace();
            System.out.println("join is exception");
        }
        System.out.println("main is finished!!!");
    }
}
